import { executeSql } from './src/util/db.js';

async function checkContent() {
  try {
    // 检查文章内容字段
    const data = await executeSql('SELECT id, title, content, intro FROM articles WHERE id IN (226, 227, 140) LIMIT 3');
    
    console.log('=== 数据库字段内容检查 ===');
    data.forEach(item => {
      console.log(`\nID: ${item.id}`);
      console.log(`Title: ${item.title}`);
      console.log(`Content字段: ${item.content ? (typeof item.content === 'string' ? item.content.substring(0, 100) + '...' : item.content) : 'NULL'}`);
      console.log(`Intro字段: ${item.intro ? (typeof item.intro === 'string' ? item.intro.substring(0, 100) + '...' : item.intro) : 'NULL'}`);
      console.log('---');
    });
  } catch (error) {
    console.error('检查失败:', error.message);
  }
}

checkContent();
